package com.Brewing.springboot.controller.TpBgm;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Company: </p>
 * @author  庄磊
 * @date	2018年12月21日 下午3:10:20 
 * @version 1.0
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.Brewing.springboot.common.BrewingJSONResult;
import com.Brewing.springboot.service.TpBgm.BgmService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

@RestController
@Api(value="Bgm-Api",tags= {"Bgm-Api"})
@RequestMapping("/bgm")
public class TpBgmController {
	@Autowired
	private BgmService BgmService;
	
	@ApiOperation(value="获取背景音乐列表", notes="获取背景音乐列表的接口")
	@PostMapping("/list")
	public BrewingJSONResult list() {
		return BrewingJSONResult.ok(BgmService.queryBgmList());
	}
	
	@ApiOperation(value="获取背景音乐", notes="获取背景音乐的接口")
	@PostMapping("/get")
	@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "query")
	public BrewingJSONResult get(String id) {
		return BrewingJSONResult.ok(BgmService.queryBgmById(id));
	}
}
